package train48days;

import java.util.Scanner;

public class 查找输入整数二进制中1的个数 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            char[] arr = Integer.toBinaryString(n).toCharArray();
            int count = 0;
            for (char c : arr) {
                if (c == '1') {
                    count++;
                }
            }
            System.out.println(count);
        }
    }
}
